const addUser = require('./user/add')
const getUserInfo = require('./user/get-info')
const addRoom = require('./room/add')
const getRoomInfo = require('./room/get-info')
const addRoomPlayer = require('./room/add-player')
const updateRoomInfo = require('./room/update-info')
const isUserPlaying = require('./room/is-user-playing')
const addMessage = require('./message/add')
const addPoint = require('./point/add')
const getPointList = require('./point/get-list')

exports.main = async (event, context) => {
  switch (event.url) {
    case 'user/add':
      return await addUser.main(event, context)
    case 'user/getInfo':
      return await getUserInfo.main(event, context)
    case 'room/add':
      return await addRoom.main(event, context)
    case 'room/getInfo':
      return await getRoomInfo.main(event, context)
    case 'room/addPlayer':
      return await addRoomPlayer.main(event, context)
    case 'room/updateInfo':
      return await updateRoomInfo.main(event, context)
    case 'room/isUserPlaying':
      return await isUserPlaying.main(event, context)
    case 'message/add':
      return await addMessage.main(event, context)
    case 'point/add':
      return await addPoint.main(event, context)
    case 'point/getList':
      return await getPointList.main(event, context)
  }
}